Klarna Payments
Klarna allows online customers to purchase goods and pay later (up to 30 days depending on the market), or in instalments. This credit arrangement is between Klarna and the customer. Klarna pays the merchant, and the customer pays Klarna back, eliminating any risk for the merchant. |
AltaPay offers integration into Klarna Payments as standard, supporting Pay Later and Financing. (Pay Now is not an invoice solution, and is not supported by AltaPay.) The previous product, Klarna KPM is deprecated from September 2020.
We currently support Klarna for Pay Later, which is invoicing; and Financing, which allows the customer to pay for the goods in instalments. For both options, you receive the money from Klarna after an agreed period of time. As the merchant, you are not affected by the option in terms of settlement.
We support One Klarna, which allows the consumers to pay with multiple payment methods. Request your MID to be configured by Klarna, and the solution will work out of the box once the changes are applied.
AltaPay supports B2B and B2C purchases in all countries that are supported by Klarna. See B2B Orders for more details.
If you previously used Klarna KPM, your agreement will apply for Klarna Payments. Simply upgrade your integration and enjoy the benefits of the new Klarna Payments offering. These benefits include increased speed, a single integration for all Klarna payment methods, global compliance, exposure to new markets, including the UK, and opportunities to increase conversions. (With Klarna Payments, you can send more customer information to Klarna, which will increase approval rates, and you can offer prefilled details at the checkout.) Klarna, in turn, will provide the customer with more detailed information about the rates and fees potentially incurred. See Differences between Klarna KPM and Klarna Payments and https://www.klarna.com/international/business/upgrade-solution/ for more details.
Agreements through Klarna
Klarna Subscriptions integration is available only from Version: 20240829 (previously 20240522)
Agreements
An agreement is used to provide subscription service to sell to customers.
- Agreements can be set by sending a createPaymentRequest request. For more information about setup agreements please visit Setup Agreement page.
- Only recurring agreements are supported.
- The subscription model order line is used to fulfill the agreement setup.
- Klarna supports only Daily, Weekly, Mohthly and Yearly recurring agreement frequencies.
Charges
- Agreements can be charges by sending a chargeSubscription or reserveSubscriptionCharge request. For more information about charging agreements please visit Charge Agreement page.
Refunds
- Charge Agreement payments can be refunded by sending a refundCapturedReservation request.
- Charged agreement amount can be refunded full or partially as long as the refund amount is less or equal to already refunded amount.
- The merchant has to provide order lines to the refund request to have a better customer experience. Nevertheless, the initial order lines will be used in case of not providing others for full refunds.
- The merchant must provide at least one order line in case of partial refunds.
Releases
- Agreements can be released by sending a releaseReservation request.
- Charges not captured yet can be release by sending a releaseReservation request.
You must have an agreement with Klarna that covers all of the functionality per country required by your business, including B2B if appropriate.
Your webpage should clearly show the Klarna customer terms and conditions, as described here - https://developers.klarna.com/documentation/klarna-payments/legal-privacy/eu/
Klarna Payments is supported from release 20200224.
How it works
There are two stages involved in processing payment for goods using Klarna Payments - reservation of payment; and capture of payment. During payment reservation, Klarna evaluates the customer based on the information sent by the merchant, and then presents the customer with the choice of payment methods eg Pay Later or Invoicing (previously called "Slice-it"). When the customer selects one and provides relevant additional information, the payment is reserved.
Reserving a Payment
This is the first stage of processing the payment, when the order is placed by the customer and Klarna authorizes the payment. The following diagram illustrates the steps involved in reservation of payment that are relevant to you as a merchant.
- The customer goes to your checkout page, and selects Klarna as the payment method.
- You (the merchant) send a createPaymentRequest to AltaPay, including the customer and order details, and specifying Klarna as the selected payment method.
- AltaPay returns the payment id and redirect URL to you, and you then redirect the customer to the AltaPay secure payment page, based on the response.
- The customer's browser connects to AltaPay's secure payment page.
- AltaPay initiates a call with Klarna, passing all available data including billing address, shipping address, shipping options, order details, order amount, locale and merchant URLs.
- Klarna completes a pre-assessment based on the order details, to establish the payment method categories they are prepared to offer.
- They return to payment method categories, along with logo and parameters to AltaPay.
- AltaPay displays the available Klarna payment options to the customer, using the load call.
- The customer selects the required payment option and AltaPay sends an Authorize call to Klarna, with the payment method category.
- Klarna conducts a customer risk assessment to establish whether they are prepared to offer the customer that amount of credit.
- There is a further exchange between AltaPay and Klarna, resulting in an order from Klarna to AltaPay to establish the payment method details selected by the customer. The response includes all of the order details, including extended payment details.
- You (the merchant) receive a confirmation from AltaPay when the transaction has been processed, including the billing address the amount/currency and selected payment details.
- You should validate the returned amount and currency, and then show or redirect the customer to the appropriate message page, confirming success or informing them of any problem with the payment.
This is the standard payment flow for the initial reservation. There may be slight changes to this flow, depending on certain conditions.
Parameters for Reserving a Payment
You use the createPaymentRequest method in the Merchant API to pass information to AltaPay.
The following parameters are mandatory for all integrations:
Parameter |
Description |
Type |
Mandatory |
---|---|---|---|
terminal |
The terminal determines the payment method and currency. For more information, see AltaPay's Payment Gateway. This is the title of your terminal, found under Home > Terminal Settings in the Merchant Interface. You can use variables in the terminal parameter. For example, if you want to call My EUR Terminal, you can set the terminal parameter value to 'My {currency} Terminal', where {currency} references the value of the currency parameter. |
string |
Yes |
shop_orderid |
This is the internal ID of the order in your webshop. In most integrations, you can use the same order ID for up to four orders. The shop_orderid value is posted back to you, so you know the order to which the payment refers. |
[a-zA-Z0-9-]{1,100} PayPal and MobilePay only accept order IDs of 50 characters or less |
Yes |
amount |
This is the payment amount.You must use a dot as the decimal separator, and the amount can have maximum 2 decimals. |
float |
Yes |
currency |
This is the payment currency. It must be specified in an ISO-4217 format, either using the 3-digit numeric code, or the 3-letter character code. For more information about ISO-4217 currency codes, see https://en.wikipedia.org/wiki/ISO_4217. |
[0-9]{3} or [A-Z]{3} |
Yes |
Parameter |
Description |
Type |
Mandatory |
---|---|---|---|
language |
The language in which the payment form is displayed. For more information about supported language codes, see Supported languages. If the language parameter is not set, the language is derived from the browser's Accept-Language HTTP header field. If none of the browser languages are supported, the default is English, en. If the language you set is not supported, an error is returned. |
[a-z]{2} |
|
transaction_info |
This is a one-dimensional associative array, where you can put any value that you would like to associate with the payment in the call to createPaymentRequest. |
Array Maximum 50 entries of maximum 255 characters each. |
|
type |
This is the authorization type. For more information, see Payment request types:
|
string |
|
sale_reconciliation_identifier |
This is the sales reconciliation identifier, used in the reconciliation CSV files you can download from the Merchant Information Interface, or by using the getCustomReport method. For more information, see getCustomReport.This parameter can only be used when the type parameter is set to paymentAndCapture. |
String{0,100} |
|
sale_invoice_number |
This is the invoice number for the capture. |
String{0,100} |
|
fraud_service |
Setting the fraud_service parameter lets you select a different fraud detection service on the payment level. |
none maxmind red test |
|
cookie |
This is the cookie that will be sent back to all your callback URLs. For example, if your cookie parameters are set to |
String |
|
payment_source |
This identifies the source of the payment. The default value is eCommerce. moto is treated as telephone_order. |
eCommerce mobi moto mail_order telephone_order |
|
shipping_method |
Fraud detection services can use this parameter in the fraud detection calculations. |
LowCost DesignatedByCustomer International Military NextDay Other StorePickup TwoDayService ThreeDayService |
|
customer_created_date |
This is the date when the customer account was first created in your shopping system. Fraud detection services use this parameter in the fraud detection calculations. |
Date (yyyy-mm-dd) |
|
organisation_number |
this is the company registration number (CRN), and is used to identify the company and verify the fact that it is a entity registered with the relevant authority, for example, Companies House in the UK. Do not confuse this with the customer_info[vat_id], although in some countries the number may be the same. To ensure that the organisation number field is pre-populated on the invoice payment form, set the organisation_number parameter. |
String{0,20} |
Yes, if the customer_info[type]=business |
sales_tax |
The sales tax amount. Indicates how much of the gross amount that was sales tax, e.g. VAT (UK) or Moms (DK). |
float |
Parameter | Description | Type | Mandatory |
---|---|---|---|
customer_info[username] | The customer's e-user name or user id. This uniquely identifies the user in your system. | string | |
customer_info[type] | Indicator of whether the customer is an individual or a business | privatebusiness | Private is assumed if not specified |
customer_info[company_name] | Name of the customer, if the customer type is Business | string | Yes, if the customer_info[type]=business |
customer_info[company_type] | The nature of the company |
ltd - limited company plc - public limited company public_institution - public institution Other - all other company types |
Yes, if the customer_info[type]=business |
customer_info[vat_id] | The company's VAT registration number | string | Yes, if the customer_info[type]=business |
customer_info[shipping_att] | The name of the person receiving the purchase on behalf of the company | string | Used if the customer_info[type]=business; optional but recommended |
customer_info[shipping_lastname] |
The last name for the customer's shipping address. |
String | |
customer_info[shipping_firstname] |
The first name for the customer's shipping address. |
String | |
customer_info[shipping_address] |
The street address of the customer's shipping address.
See the Notes on Addresses in Klarna Payments for more details on handling addresses for KP. |
string | YesFor Norway, you can only ship to a customer's legal address |
customer_info[shipping_postal] |
The postal code of the customer's shipping address. |
string | |
customer_info[shipping_region] |
The region of the customer's shipping address. |
string | |
customer_info[shipping_country] |
The country of the customer's shipping address as a 2 character ISO-3166 country code. |
[a-zA-Z]{2} | |
customer_info[shipping_city] |
The city of the customer's shipping address. |
string | |
customer_info[shipping_ref] | A reference that can be used to track the order | string | Optional. Can be used for B2B transactions (the customer_info[type]=business) |
customer_info[email] |
The customer's email address. |
string |
Yes for all Przelewy24 transactions Yes for NO and DE |
customer_info[customer_phone] |
The customer's telephone number, without spaces. This must include the country code. You can prefix the code with + (e.g. +446721846), or 00 (e.g. 00446721846), or omit the prefix (e.g. 446721846). |
string | |
customer_info[birthdate] |
The birth date of the customer Mandatory if your MCC code is 6012. |
Date (yyyy-mm-dd) | Yes, if your MCC code is 6012 |
customer_info[billing_lastname] |
The last name for the customer's billing address. Mandatory if your MCC code is 6012. |
String |
Yes, for DK, FI, and DE. |
customer_info[billing_firstname] |
The first name for the customer's billing address. |
String |
Yes, for DK, FI, and DE |
customer_info[billing_address] |
The street address of the customer's billing address. See the Notes on Addresses in Klarna Payments for more details on handling addresses for KP.
|
string |
Yes, for DK, FI, and DE |
customer_info[billing_city] |
The city of the customer's billing address. Mandatory for fraud detection. |
string | |
customer_info[billing_region] |
The region of the customer's billing address. Mandatory for fraud detection. |
string | |
customer_info[billing_postal] |
The postal code of the customer's billing address. Mandatory if your MCC code is 6012. Mandatory for fraud detection. |
string |
Yes |
customer_info[billing_country] |
The country of the customer's billing address as a 2 character ISO-3166 country code. Northern Ireland is an exception; see here. Mandatory for fraud detection. |
[a-zA-Z]{2} |
Yes |
customer_info[billing_att] | The name of the person/role who manages the billing for the company | string | |
customer_info[billing_ref] | A reference, for example, cost center, that can be used to track the purchase order | string | Optional. Can be used for B2B transactions (the customer_info[type]=business) |
customer_info[bank_phone] |
The phone number of the bank where the credit card was issued. |
String | |
customer_info[bank_name] | string | ||
customer_info[gender] |
Certain invoice payment providers require gender to be sent. Use this field to comply with that requirement. If this parameter is required by the provider, but not set in the method call, the customer is asked for this information on the payment page (callback_form). |
FMmalefemale |
|
customer_info[client_ip] |
The customer's IP address. Used for fraud detection. |
string | |
customer_info[client_session_id] |
A unique identifier of the customers session (eg. an md5 hash of the real session id). Used for fraud detection. |
string | |
customer_info[client_accept_language] |
The language setting of the customers browser. Used for fraud detection. |
string | |
customer_info[client_user_agent] |
The customers browser identification. Used for fraud detection. |
string | |
customer_info[client_forwarded_ip] |
The customers IP address as forwarded by transparent proxy. Used for fraud detection. |
string |
Notes on Addresses in Klarna Payments
You (the merchant) are expected to supply the billing address and, optionally, shipping address in the createPaymentRequest/Reservation call. You can also provide att (for the attention of) and ref (reference code) information for both billing and shipping addresses. If no shipping address is provided, the billing address is used.
The billing address will be validated by Klarna as an address used by the customer in other contexts. It is not validated as valid physical address.
The address and associated details are saved by Klarna to the customer's Klarna ID, which is stored in a cookie.
The next time the same customer accesses Klarna from the same device, the address details will be prefilled.
In Klarna Payments, AltaPay includes all data in the reservation success callback to the merchant. You will receive notification of the total amount reserved, all order lines and billing address details, and, in some cases, the customer's email. You should be able to use the address received as part of the reservation success callback to validate the billing address. We do not recommend using it to validate the shipping address.
Parameter | Description | Type | Mandatory |
---|---|---|---|
orderLines | The individual line items of the order. This is mandatory for some providers, and recommended for a good customer experience. | Array |
Yes
|
Value |
Description |
Type |
Mandatory |
---|---|---|---|
description |
Description of an item. |
String (255) |
Yes |
itemId |
The item identification. Each itemId must be unique within an order. |
String (100) |
Yes |
quantity |
The quantity of the item. The value must be greater than zero. |
Decimal |
Yes |
unitPrice |
The unit price, excluding sales tax. The value must be greater than zero, unless the optional goodsType parameter is set to handling, in which case the field can be used to provide a discount. |
Decimal |
Yes |
taxPercent |
This is the tax percentage of the unit price. Send both the taxPercent and taxAmount parameters in the method call. If you provide only one, the other is inferred, and rounding errors may occur. The taxAmount is used for the calculation, and taxPercent is printed on the invoice.
|
Decimal |
No |
taxAmount |
This is the total tax on an order line, before any discounts are applied. It is recommended to use taxAmount if possible. If you provide both taxPercent and taxAmount, the amount takes precedence. Send both the taxPercent and taxAmount parameters in the method call. If you provide only one of the taxPercent and taxAmount parameters, the other parameter is inferred, and rounding errors may occur.
The taxAmount is used for the calculation, and taxPercent is printed on the invoice. |
Decimal |
Yes |
unitCode |
The relevant measurement unit for the order line. For example, kg. |
String (50) |
|
discount |
The order line's discount in percent. |
Decimal |
|
goodsType |
The goods type of the order line - shipment| handling| item| digital| discount| gift_card| info| physical| sales_tax |
Yes |
|
imageUrl |
The full URL of the icon for the item |
String (255) |
|
productUrl | The full URL for the description of the item | String (255) |
Parameter |
Description |
Type |
Mandatory? |
---|---|---|---|
config[callback_form] | This is the callback form, or the payment page, and corresponds to the Callback url (form) setting in the Terminal settings. For more information, see Settings for the Payment Page (callback_form). For information about custom styling for the payment page, see Styling the payment page (callback_form). | String (Url) | No |
config[callback_ok] | This url is called when a payment succeeds, and corresponds to the Callback url (Ok) setting in Terminal settings. For more information, see Settings for the Payment OK page (callback_ok). | String (Url) | No |
config[callback_fail] | This url is called when a payment fails, and corresponds to the Callback url (Fail) setting in Terminal settings. For more information, see Settings for the fail page (callback_fail). | String (Url) | No |
config[callback_open] | This url is called when a payment returns with status Open, and corresponds to the Callback url (open) setting in Terminal settings. For more information, see Settings for the open page
(callback_open). For Klarna payments, the open page (callback_open) is used for pending transactions. |
String (Url) | No |
config[callback_notification] | This url is called when a notification is returned after the customer has left the payment flow, and corresponds to the Callback url (notification) setting in Terminal settings. For more information, see Payment Notification (callback_notification) For Klarna payments, the notification page (callback_notification) is used for transactions pending clarification. |
String (Url) | No |
config[callback_verify_order] |
This URL is called just before the payment is processed.
If the payment fails, the first 255 characters of your response is shown as an error message to the customer. |
String (Url) | No |
config[callback_redirect] |
This url is called whenever the customer is redirected to a third party, and corresponds to the Callback url (redirect) setting in Terminal settings. For more information, see Settings for the redirect page (callback_redirect). |
String (Url) | No |
The table shows the most pertinent response values for the method. For a complete list of API response parameters, see API Response structure (XML).
Value | Description |
---|---|
Result |
The result of the request, for example:
|
PaymentRequestId | The payment request ID, used for subsequent processing. |
Url | The URL to redirect your customer to. |
DynamicJavascriptUrl | A url you can use in a Javascript to create an overlay payement page. For more information, see Styling a floating payment window. |
Post Reservation Processing
There are a number of possible actions that take place after the reservation phase:
- Capture, which is the second phase of processing the payment. You can find out more about the different capture scenarios below.
- Cancellation of the payment, in which the entire order is cancelled. You cannot cancel the transaction if any capture, including partial capture, has taken place.
- Refunding some or all of a payment. You can only refund captured amounts. You cannot over refund.
Capturing a Payment
This is the second phase of processing the payment, when the payment is "claimed" by the merchant from Klarna. Typically this takes place when the goods are shipped to the customer.
There are several capture scenarios, including:
- Full capture, in which the entire order is fulfilled and all funds are captured
- Partial capture, followed by another partial capture to complete the order
- Partial capture, without a follow up to complete the order
The flow is as follows:
- The capture amount is mandatory.
- We advise that you include the order lines for full and partial captures, to improve the customer experience.
- If the order amount of the capture does not match the order lines listed in the original createPaymentRequest, Klarna will perform the capture, but will not display any items to the customer.
- We advise that you cancel the transaction if the goods are not predicted to be in stock within a reasonable timeframe. Transactions cannot be cancelled once any capture (full or partial) has taken place.
-
Authorizations on transactions expire after 28 days, after which you cannot capture the transaction. You can, however:
- request a longer authorization default from Klarna
- call and request that an expiring transaction has the timeout extended. You must do this before the timeout occurs.
- You can send shipment tracking information with a capture. This is not mandatory, but recommended for a better customer experience when they are using the Klarna App to view the purchase.
Parameters for Capturing Payments
To capture a payment, create a capture request, using the captureReservation method, with the following parameters:
Parameter |
Description |
Type |
Mandatory | ||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
amount |
This is the gross amount to be captured (including taxes). If you do not want to capture the full amount, a smaller amount can be captured. The amount must be greater than 0.00, and equal to, or lower than the reserved amount. |
float | Yes | ||||||||||||||||||||||||||||||||||||||||||||||||
orderLine |
|
Recommended | |||||||||||||||||||||||||||||||||||||||||||||||||
reconciliation_identifier |
This is the sales reconciliation identifier, used in the reconciliation CSV files you can download from the Merchant Interface, or by using the getCustomReport method. For more information, see getCustomReport. |
String{0,100} | |||||||||||||||||||||||||||||||||||||||||||||||||
sales_tax |
The sales tax amount. Indicates how much of the gross amount that was sales tax, e.g. VAT (UK) or Moms (DK). |
float | |||||||||||||||||||||||||||||||||||||||||||||||||
trackingInfo[] |
Tracking information, in an array. Could include:
trackingInfo[0][trackingId] = 1
trackingInfo[0][companyName] = Mærsk trackingInfo[0][method] = PickUpStore trackingInfo[0][trackingNumber] = 123abc trackingInfo[0][trackingUri] = www.tracking.com/id trackingInfo[0][type] = SHIPPING trackingInfo[1][trackingId] = 1 trackingInfo[1][refTrackingId] = 2 trackingInfo[1][companyName] = ReturnCo trackingInfo[1][trackingNumber] = 456abc trackingInfo[1][trackingUri] = www.tracking.com/id2 trackingInfo[1][type] = RETURN See https://docs.klarna.com/api/ordermanagement/#operation/captureOrder Please make sure you passed same number of tracking info of SHIPPING type with the RETURN type so that it can be mapped correctly with the KlarnaPayments shipping_info |
Array | Optional but recommended | ||||||||||||||||||||||||||||||||||||||||||||||||
transaction_id | The id of a specific payment. | [0-9a-f]{1,32} | Yes |
Processing a Partial Capture
There may be a delay in shipment of some of the goods, which results in several partial captures.
Let's assume you have created a successful payment request for a scarf and a pair of trousers.
Because the trousers are out of stock with your supplier, you can only deliver the scarf at this point, and can therefore only partially capture the payment.
The original payment (reservation) has the following order lines:
Description | Item ID | Quantity | Unit price | Tax percentage | Tax amount | Goods type |
---|---|---|---|---|---|---|
Yellow scarf | 0001 | 1 | 50.0 | 10.0 | 5.0 | item |
Blue trousers, size L | 0002 | 1 | 75.0 | 10.0 | 7.5 | item |
You capture the funds, using the payment ID of the original payment, but only including the order line for the scarf.
Description | Item ID | Quantity | Unit price | Tax percentage | Tax amount | Goods type |
---|---|---|---|---|---|---|
Yellow scarf | 0001 | 1 | 50.0 | 10.0 | 5.0 | item |
You do the final capture for the remaining items when they become available. This must be completed within twenty-eight days of the original order reservation, unless you have agreed an extended payment period with Klarna.
To partially capture the payment, you call the captureReservation method.
You should include the captured order lines in the order. Klarna can then match the amount and show the customer on the Klarna app which products have been captured.
All components of the order line in the partial capture must exactly match the order line from the original payment.
Updating Orders
For Klarna Payments, through updateOrder method, the AltaPay Payment Processing Service allows you to:
-
Update order lines and amount
Using the updateOrder endpoint, send the order lines and the amount you would like to change. For more information about updating order lines and amount please see the Notes section on updateOrder page.
-
Update tracking information
Using the updateOrder endpoint, send the trackingInfo parameter to update the information. You will be required to associate shipping and returns together. See the updateOrder page for more information.
-
Update customer information
Using the updateOrder endpoint, send the customer_info parameter to update the customer information.
-
Trigger resend of customer communication
When the payment is in captured state and the terminal is configured, you can notify the customer on updating the order. To enable the notify customer functionality with Klarna Payments, please contact our support team.
All this Klarna operations will be executed when you update the order through the AltaPay Payment Processing Service.
In case one of the update operations fail, you will get a PartialSuccess response. In <MerchantErrorMessage> you can find out which of the operations failed and why. In the case of partial success, we strongly recommend to do the update order again with the right parameters.
Update order lines and amount is possible only for the transactions that is in reserved or partially captured state.
The customer communication is triggered by AltaPay only in case of the operation result in "Success" or "PartialSuccess"
Parameters for Updating orders
To update an order, create a update order request, using the updateOrder method, with the following parameters:
Parameter | Description | Type | Mandatory | ||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
payment_id |
The id of a specific payment. |
[0-9a-f]{1,32} | Yes | ||||||||||||||||||||||
amount |
This is the gross amount to be updated to (including taxes). In cases of invoice payments it should match the gross total amount of order lines. You must use a dot as the decimal separator, and the amount can have maximum 2 decimals. |
float | Yes | ||||||||||||||||||||||
orderLines | Listing of order lines. |
Array See table below |
No
In case it's not passed, it will remove all the order lines
|
||||||||||||||||||||||
customer_info |
Listing of customer info for updating shipping details. Could include:
customer_info[shipping_lastname] = Hansen
customer_info[shipping_firstname] = Palle customer_info[shipping_address] = My Shipping Address 456 customer_info[shipping_postal] = 4095 customer_info[shipping_region] = Hovedstaden customer_info[shipping_country] = Denmark customer_info[shipping_city] = Copenhagen customer_info[email] = myuser@company.com customer_info[1][customer_phone] = +4512345678 customer_info[1][company_name] = MyCompany |
Array See table below |
No
In case it's not passed, the customer information will not be updated.
|
||||||||||||||||||||||
trackingInfo[] |
Tracking information, in an array. Could include:
trackingInfo[0][trackingId] = 1
trackingInfo[0][companyName] = Mærsk trackingInfo[0][method] = PickUpStore trackingInfo[0][trackingNumber] = 123abc trackingInfo[0][trackingUri] = www.tracking.com/id trackingInfo[0][type] = SHIPPING trackingInfo[1][trackingId] = 2 trackingInfo[1][refTrackingId] = 1 trackingInfo[1][companyName] = ReturnCo trackingInfo[1][trackingNumber] = 456abc trackingInfo[1][trackingUri] = www.tracking.com/id2 trackingInfo[1][type] = RETURN Please make sure you link the corresponding RETURN tracking to the SHIPPING tracking so that it can be mapped correctly with the KlarnaPayments shipping_info |
Array |
No
In case this parameter is not passed, the tracking information will not be updated.
|
Order lines
Parameter | Description | Type | Mandatory |
---|---|---|---|
orderLines | The individual line items of the order. | Array |
Yes
|
For each order line:
Value |
Description |
Type |
Mandatory |
---|---|---|---|
description |
Description of an item. |
String (255) |
Yes |
itemId |
The item identification. Each itemId must be unique within an order. |
String (100) |
Yes |
quantity |
The quantity of the item. The value must be greater than zero. |
Decimal |
Yes |
unitPrice |
The unit price, excluding sales tax. The value must be greater than zero, unless the optional goodsType parameter is set to handling, in which case the field can be used to provide a discount. |
Decimal |
Yes |
taxPercent |
This is the tax percentage of the unit price. Send both the taxPercent and taxAmount parameters in the method call. If you provide only one, the other is inferred, and rounding errors may occur. The taxAmount is used for the calculation, and taxPercent is printed on the invoice.
|
Decimal |
No |
taxAmount |
This is the total tax on an order line, before any discounts are applied. It is recommended to use taxAmount if possible. If you provide both taxPercent and taxAmount, the amount takes precedence. Send both the taxPercent and taxAmount parameters in the method call. If you provide only one of the taxPercent and taxAmount parameters, the other parameter is inferred, and rounding errors may occur.
The taxAmount is used for the calculation, and taxPercent is printed on the invoice. |
Decimal |
Yes |
unitCode |
The relevant measurement unit for the order line. For example, kg. |
String (50) |
|
discount |
The order line's discount in percent. |
Decimal |
|
goodsType |
The goods type of the order line - shipment | handling | item | digital | discount | gift_card| physical | sales_tax |
Yes |
|
imageUrl |
The full URL of the icon for the item |
String (255) |
|
productUrl | The full URL for the description of the item | String (255) |
Processing a Refund
Refunds take place after the capture of funds. There are several refund scenarios.
- Full refund, which returns the funds for the entire transaction
- Partial refund, which returns the funds for some of the order lines
- Goodwill refund, which you can use to refund an arbitrary amount, independent of the existing order lines. You cannot refund more than the captured amount.
The flow is as follows:
Note the following when managing refunds:
- You can only refund up to the captured amount.
- You can refund multiple captures in a single refund, as long as they are all part of the same transaction/order.
- You cannot refund from multiple orders/transactions in a single refund.
- Goodwill refunds can be processed, as described below.
Goodwill Refunds
Merchants can offer goodwill refunds if required, noting the following:
- The total amount of all refunds cannot exceed the captured amount on the order.
- You should submit goodwill refunds on a separate refund request to any other refund, leaving the orderLine details blank.
Parameters for Processing Refunds
To process a refund, create a refund request with the following parameters:
Parameter |
Description |
Type |
|||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
amount | The amount to refund, including taxes. | ||||||||||||||||||||||||||||||||||||||||||||||||||
orderLine | Leave blank for goodwill refunds. For all other refunds, the following values are available/required.
|
||||||||||||||||||||||||||||||||||||||||||||||||||
reconciliation_identifier |
This is the sales reconciliation identifier, used in the reconciliation CSV files you can download from the Merchant Interface, or by using the getCustomReport method. For more information, see getCustomReport. |
String{0,100} |
If order lines are not provided in a refund, Klarna will check whether an order or order line amount matches the refund amount. If they match, Klarna will display the refunded order line(s) to the customer in the Klarna app. If the figures do not match, Klarna will perform the refund but will not display any items to the customer.
Supported Countries for B2C
Klarna Payments (for B2C) is supported by AltaPay in the following countries, locales and :
Country | Purchase country | Currency ** | Locales* | Country specific Requirements |
---|---|---|---|---|
Austria | AT | EUR | de-AT, en-AT | |
Denmark | DK | DKK | da-DK, en-DK | |
Germany | DE | EUR | de-DE, en-DE | To adhere to German data protection laws, the customer must actively consent (via a checkbox) to a specific text, both for Klarna Invoice and Klarna Account. The text needs to be generated based on text snippets from Klarna, found here: http://developers.klarna.com/en/dynamic-store-assets/consumer-terms-conditions (Select Germany as the country, EID is not needed). |
Netherlands | NL | EUR | nl-NL, en-NL | It is required by law to show a banner warning your customer that it costs money to borrow money. This is managed by Klarna. |
Norway | NO | NOK | nb-NO, en-NO | Norway has some very strict requirements for the Klarna Account option. For detailed information, see: https://developers.klarna.com/en/no/kpm/consumer-terms-and-conditions (Klarna Campaign is not relevant because it is a special product offered). You must only send goods to the publicly registered address. |
Sweden | SE | SEK | sv-SE, en-SE | For Swedish customers, Klarna does an address verification. If the address your customer enters differs from the registered address, your customer needs to approve the updated address. The updated address is returned via the <RegisteredAddress> XML response element. You can set up your terminal so that transactions are declined if the addresses do not match. |
Switzerland | CH | CHF | de-CH, fr-CH, it-CH, en-CH | |
United Kingdom | GB | GBP | en-GB |
**Klarna only supports the local currency
B2B Orders
Klarna Payment for B2B invoice payment orders is supported in Germany, Norway, Sweden and Finland.
The customer must be a VAT registered company.
The billing address must be in Germany, Norway, Sweden or Finland.
Country | Purchase country | Supported Locales* | Supported Currency** | Country specific Requirements |
---|---|---|---|---|
Finland | FI | fi-FI, sv-FI, en-FI |
EUR |
|
Germany | DE | de-DE, en-DE | EUR |
To adhere to German data protection laws, the customer must actively consent (via a checkbox) to a specific text. The text needs to be generated based on text snippets from Klarna, found here: http://developers.klarna.com/en/dynamic-store-assets/consumer-terms-conditions (Select Germany as the country, EID is not needed). |
Norway | NO | nb-NO, en-NO | NOK |
You must only send goods to the publicly registered address. |
Sweden | SE | sv-SE, en-SE | SEK | Klarna does an address verification. If the address your customer enters differs from the registered address, your customer needs to approve the updated address. The updated address is returned via the <RegisteredAddress> XML response element. You can set up your terminal so that transactions are declined if the addresses do not match. |
**Klarna only supports the local currency
Parameters for B2B
As well as the standard parameters for createPaymentRequest, if you are integrating Klarna Payments for B2B transactions, be aware of the following parameters:
Parameter |
Description |
Type |
Mandatory |
---|---|---|---|
customer_info[type] |
Indicator of whether the customer is an individual or a business |
private business |
Ensure that this is business |
customer_info[company_name] | Name of the customer | string | Yes |
customer_info[company_type] | The nature of the company |
ltd - limited company plc - public limited company public_institution - public institution other - all other company types |
Yes |
customer_info[vat_id] | The company's VAT registration number | string | No |
The company's registration number | string | No | |
customer_info[billing_att] | The name of the person or department managing the billing for the company | string | No |
customer_info[shipping_att] | The name of the person or department receiving the purchase on behalf of the company | string | No |
customer_info[billing_address] |
The street address of the customer's billing address. |
string |
Yes, for DK, FI and DE |
customer_info[reference] | A reference, for example, cost center, that can be used to track the order | string | No |
Features that are not currently supported
The following features are not supported:
Feature | Description |
---|---|
Over refund | It is not possible to refund more than the captured amount. |
Credit | It is not possible to create credit transactions. |
Differences between Klarna KPM and Klarna Payments
If you have been using Klarna KPM, you should note the following differences with the introduction of Klarna Payments:
- You should see higher conversion rates, if you send more data regarding the customer to Klarna, because Klarna is then more likely to offer a payment method to the customer.
- If you use(d) Klarna KPM, you will have logic in your sales flow that invoices Klarna, and sends them an invoice when a customer pays using Klarna KPM. With Klarna Payments, this logic is not required. There is no special case needed for Klarna – all sales payments (Klarna, Creditcards etc) are handled normally, invoicing the customer and, optionally, sending the invoice to them.
- You can now send URLs/links with the orderlines to product description and product images.
- Klarna will display any instalments, rates and fees associated with the actual order to the customer.
- Business2Business is now supported through Klarna Payments
- New orders will have an expiration date of 28 days from the day the order was created by default, although this can be negotiated with Klarna. If you don’t capture the order before it expires, it will be cancelled automatically.
Migrating from Klarna KPM
Klarna KPM is being deprecated in 2020, in favour of Klarna Payments. Klarna Payments will offer you and your customers more functionality, and allow you to benefit from future developments roadmapped by Klarna.
When migrating from Klarna KPM to Klarna Payments, bear the following in mind:
- Both payment methods can be run at the same time, using different terminals, and you will get a new e-store ID. You should set up test versions of Klarna Payments on a small subset of your terminals to ensure smooth transition. Simply integrate Klarna Payments as a new payment method, and when you have completed testing and are confident of the new functionality, migrate your terminals over to Klarna Payments.
- You should not run both payment methods on the same terminal, as it will cause operational issues.
- An order must run to completion on the chosen payment method, which means that even when you are fully ready to run only Klarna Payments, you must retain a KPM terminal to allow for the existing KPM orders to complete their processing. For example, a refund on a KPM order can only be delivered via the KPM terminal, using the Merchant Information Interface.
- As Klarna Payments is, effectively, a different payment method, any information you have stored against a customer using Klarna KPM will not migrate to the new method, and they will be required to provide it again.